package com.mihoyo.controller;

import com.mihoyo.domain.Store;
import com.mihoyo.service.StoreService;
import com.mihoyo.util.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/store")
public class Controller {


    @Autowired
    private StoreService storeService;

    @PostMapping("/add")
    public AjaxResult add(@RequestBody Store store) {
        AjaxResult ajaxResult = storeService.add(store);
        return ajaxResult;
    }
}
